package cn.kgm.global;

/**
 * 创建责任链开始
 *
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2023-11-14 10:28
 * @Description: com.makuku.common.constants.global.GlobalHandler
 */
public abstract class GlobalHandler {

    protected GlobalHandler global;

    protected Class<? extends GlobalHandler> globalClass;

    protected Class<?> typeClass;

    protected GlobalHandler setGlobal(GlobalHandler global, Class<?> typeClass) {
        global.setGlobalClass(global.getClass());
        global.setTypeClass(typeClass);
        this.global = global;
        return this.global;
    }

    public void setGlobalClass(Class<? extends GlobalHandler> globalClass) {
        this.globalClass = globalClass;
    }

    public Class<?> getTypeClass() {
        return typeClass;
    }

    public void setTypeClass(Class<?> typeClass) {
        this.typeClass = typeClass;
    }
}
